package com.ers.modelconvert;

import com.ers.model.ProjectInfo;
import com.ers.validmodel.ProjectModel;

public class ProjectConvert {
	public static ProjectInfo toProjectInfo(ProjectModel pm){
		ProjectInfo pi = new ProjectInfo();
		pi.setAchievement(pm.getAchievement());
		pi.setCompanyName(pm.getCompanyName());
		pi.setDutyDescription(pm.getDutyDescription());
		pi.setEndTime(pm.getEndTime());
		pi.setStartTime(pm.getStartTime());
		pi.setId(pm.getId());
		pi.setProjectDescription(pm.getProjectDescription());
		pi.setProjectName(pm.getProjectName());
		return pi;
	}
	
	public static ProjectModel toProjectModel(ProjectInfo pi){
		ProjectModel pm = new ProjectModel();
		pm.setAchievement(pi.getAchievement());
		pm.setCompanyName(pi.getCompanyName());
		pm.setDutyDescription(pi.getDutyDescription());
		pm.setEndTime(pi.getEndTime());
		pm.setStartTime(pi.getStartTime());
		pm.setId(pi.getId());
		pm.setProjectDescription(pi.getProjectDescription());
		pm.setProjectName(pi.getProjectName());
		return pm;
	}
}
